package com.css.fxfzdzzh.constants;


import java.util.HashMap;
import java.util.Map;

/**
 * Created by lixiaofeng on 2020/4/20.
 */
public enum CertificationLockedEnum {
    /**
     * 用户未激活
     */
    INACTIVE("INACTIVE", "未激活"),
    /**
     * 用户装填正常
     */
    NORMAL("NORMAL", "正常"),
    /**
     * 失败次数过多锁定
     */
    TOO_MANY_FAILURES("TOO_MANY_FAILURES", "失败次数过多锁定"),

    /**
     * 管理员手动锁定
     */
    ADMIN_LOCKED("ADMIN_LOCKED", "管理员手动锁定");

    private String code;
    private String name;

    CertificationLockedEnum(String code, String name) {

        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    private static final Map<String, CertificationLockedEnum> CertificationLockedEnumMap = new HashMap<>();

    static {
        for (CertificationLockedEnum certificationLockedEnum : values()) {
            CertificationLockedEnumMap.put(certificationLockedEnum.getCode(), certificationLockedEnum);
        }
    }

    public static CertificationLockedEnum getCertificationLockedEnumMap(String symbol) {
        return CertificationLockedEnumMap.get(symbol);
    }
}
